package com.imooc.course.controller;

import com.imooc.course.entity.Course;
import com.imooc.course.service.impl.CourseListServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: spring-cloud-course
 * @description:
 * @author: CY
 * @create: 2021-06-28 20:17
 **/
@RestController
public class CourseListController {

    @Autowired
    CourseListServiceImpl courseListService;
    @GetMapping("/")
    public List<Course> getCourseList(){
        return courseListService.getCourseList();
    }
}
